//
//  HSQSinceBuyCountCollectionViewCell.m
//  LiTianDecoration
//
//  Created by administrator on 2018/7/31.
//  Copyright © 2018年 administrator. All rights reserved.
//

#import "HSQSinceBuyCountCollectionViewCell.h"

@interface HSQSinceBuyCountCollectionViewCell ()

@property (nonatomic, strong) UILabel *Placher_Label;

@end

@implementation HSQSinceBuyCountCollectionViewCell

- (instancetype)initWithFrame:(CGRect)frame{
    
    if (self = [super initWithFrame:frame]) {
        
        self.contentView.backgroundColor = [UIColor whiteColor];
        
        // 起购量
        UITextField *buyCount_TextField = [[UITextField alloc] init];
        buyCount_TextField.backgroundColor = RGB(242, 242, 242);
        buyCount_TextField.placeholder = @"起购量";
        buyCount_TextField.textColor = [UIColor blackColor];
        buyCount_TextField.font = [UIFont systemFontOfSize:12.0];
        buyCount_TextField.textAlignment = NSTextAlignmentCenter;
        buyCount_TextField.keyboardType = UIKeyboardTypeNumberPad;
        [self.contentView addSubview:buyCount_TextField];
        self.buyCount_TextField = buyCount_TextField;
        
        // 提示文字
        UILabel *Placher_Label = [[UILabel alloc] init];
        Placher_Label.text = @"以下";
        Placher_Label.textColor = RGB(71, 71, 71);
        Placher_Label.font = [UIFont systemFontOfSize:14.0];
        [self.contentView addSubview:Placher_Label];
        self.Placher_Label = Placher_Label;
        
        
        // 添加约束
        self.buyCount_TextField.sd_layout.leftSpaceToView(self.contentView, 10).centerYEqualToView(self.contentView).heightIs(30).widthIs((KScreenWidth - 50) / 2);
        [self.buyCount_TextField setSd_cornerRadius:@(5)];
        
        self.Placher_Label.sd_layout.leftSpaceToView(self.buyCount_TextField, 10).centerYEqualToView(self.buyCount_TextField).autoHeightRatio(0).autoWidthRatio(0);
        [self.Placher_Label setSingleLineAutoResizeWithMaxWidth:100];
        
    }
    
    return self;
}

@end
